<?php
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\Breadcrumbs;
use ms\assets\AppAsset;

/* @var $this \yii\web\View */
/* @var $content string */
?>
<?php $this->beginPage();
$menu =$this->params['layout_data']['menu'];
$seo =$this->params['layout_data']['seo'];
$pro_list = $this->params['layout_data']['pro_list'];?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="UTF-8">
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title><?=$seo['seo_title']?></title>
    <meta name="keywords" content="<?=$seo['seo_key']?>">
    <meta name="description" content="<?=$seo['seo_des']?>">
    <meta name="baidu-site-verification" content="AZlMZb2AcI" />
    <!-- styles -->
    <link href="/js/bootstrap.min.css" rel="stylesheet">
    <link href="/js/animate.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/assets/css/main.css">
    <!--js-->
    <script src="/js/jquery.min.js"></script>
    <script src="/js/bootstrap.min.js"></script>
    <script src="/js/hammer.min.js"></script>
    <script src="/assets/js/jquery.hammer.js"></script>
    <script src="/assets/js/main.js"></script>
    <script src="/assets/js/jquery.eff.js"></script>
    <?php $this->head() ?>
</head>
<body>
<?php $this->beginBody() ?>

    <div class="body clearfix">
        <a id="top"></a>
        <div style="position: fixed;z-index:999" class="menu left">
            <div class="logo">
                <a href="/"><img src="/assets/img/logo.png"></a>
            </div>
            <div class="navbar">
                <ul>
                    <li class="<?=$menu == 'index' ? 'act':''?>">
                        <a href="/">网站首页</a>
                    </li>
                    <li class="<?=$menu == 'projects' ? 'act':''?>">
                        <a href="<?=  Url::to(['projects/projects'])?>">客户案例</a>
                    </li>
                    <li class="<?=$menu == 'core' ? 'act':''?>">
                        <a href="<?=  Url::to(['core/core'])?>">核心技术</a>
                    </li>
                    <li class="li-mou <?=$menu == 'product' ? 'act':''?>">
                        <a href="<?=  Url::to(['product/product'])?>" style="cursor:pointer;">产品中心</a>
                        <div class="menu-cp" style="left:218px;">
                            <ul>
                                <?php
                                    if($pro_list){
                                        foreach ($pro_list as $value) {

                                ?>
                                <li>
                                    <a href="<?=  Url::to(['product/product','id'=>$value['id']])?>">
                                        <div class="menu-cp-t">
                                            <font class="m-1"><?=$value['pro_name']?></font>
                                            <font class="m-2"><?=$value['pro_intro']?></font>
                                        </div>
                                        <div class="menu-cp-b">
                                            <img src="<?=IMAGE_URL.$value['img_url']?>">
                                        </div>
                                    </a>
                                </li>
                                <?php }}else{ ?>
                                <li>
                                    <a href="#">
                                        <div class="menu-cp-t">
                                            <font class="m-1">G-700</font>
                                            <font class="m-2">industrial dust processor</font>
                                        </div>
                                        <div class="menu-cp-b">
                                            <img src="/assets/img/cp-1.png">
                                        </div>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="menu-cp-t">
                                            <font class="m-1">G-800</font>
                                            <font class="m-2">industrial dust processor</font>
                                        </div>
                                        <div class="menu-cp-b">
                                            <img src="/assets/img/cp-2.png">
                                        </div>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="menu-cp-t">
                                            <font class="m-1">G-1000</font>
                                            <font class="m-2">industrial dust processor</font>
                                        </div>
                                        <div class="menu-cp-b">
                                            <img src="/assets/img/cp-3.png">
                                        </div>
                                    </a>
                                </li>
                                <?php }?>
                            </ul>
                        </div>
                    </li>
                    <li class="<?=$menu == 'about' ? 'act':''?>">
                        <a href="<?=  Url::to(['about/about'])?>">关于我们</a>
                    </li>
                    <li class="<?=$menu == 'contact' ? 'act':''?>">
                        <a href="<?=  Url::to(['contact/contact'])?>">联系我们</a>
                    </li>
                </ul>
            </div>
            
<!--            <div class="menu-hr"></div>-->
<!--            <div class="navbar share">-->
<!--                <ul>-->
<!--                    <li>-->
<!--                        <a href="#">WHCHAT</a>-->
<!--                    </li>-->
<!--                    <li>-->
<!--                        <a href="#">WEIBO</a>-->
<!--                    </li>-->
<!--                    <li>-->
<!--                        <a href="#">TWITTER</a>-->
<!--                    </li>-->
<!--                    <li>-->
<!--                        <a href="#">FACEBOOK</a>-->
<!--                    </li>-->
<!--                </ul>-->
<!--            </div>-->
            <div class="nav-lang clearfix">
                <div class="lang-l left">
                    <font>中文&nbsp;&nbsp;&nbsp;</font><img src="/assets/img/lang-i.png">
                </div>
                <div class="lang-r right return-top">
                    <img src="/assets/img/lang-t.png">
                </div>
            </div>
        </div>
        <div class="content right">
            <?=$content?>
            <div class="footer">
                <div class="footer-t">
                    <div class="footer-t-l left">
                        <h4>订阅 Gyro Air 最新资讯</h4>
                        <div class="input-append">
                            <input placeholder="请输入邮箱地址" class="span2" id="email" name="mail" id="appendedInputButton" type="text">
                            <button type="submit" class="sub">订阅</button>
                        </div>
                    </div>
                    <div class="footer-t-r right">
                        <ul>
                            <li><font>公司地址</font><font>南京市江宁经济开发区<br>苏源大道68-10</font></li>
                            <li><font>热线电话</font><font>025-5792 8835 <br>025-5792 8812 <br />025-5792 8829</font></li>
                            <li><img src="/img/31.png"><font>海威工场</font><font></font></li>
                        </ul>
                    </div>
                </div>
                <div class="footer-x"></div>
                <div class="footer-b">
                    <div class="footer-b-l">
                        <div class="b-l-logo left"><img src="/assets/img/logo-t.png"></div>
                        <div class="b-l-li left">
                            <ul style="display: flex;">
                                <li><a href="<?=  Url::to(['projects/projects'])?>">客户案例</a></li>
                                <li><a href="<?=  Url::to(['core/core'])?>">核心技术</a></li>
                                <li><a href="<?=  Url::to(['product/product'])?>">产品中心</a></li>

                                <li><a href="<?=  Url::to(['about/about'])?>">关于我们</a></li>
                                <li><a href="<?=  Url::to(['contact/contact'])?>">联系我们</a></li>

                            </ul>
                        </div>
                        
                    </div>
                    <div class="footer-c">
                        <div class="footer-c-l left">
                            <p>Copyright © 2018 南京海威机械有限公司 All Right Reserved.</p>
                        </div>
                        <div class="footer-c-r left">
                            <ul>
                                <li>隐私权政策</li>
                                <li>使用条款</li>
                                <li>网站地图</li>
                            </ul>
                        </div>
                        
                    </div>
                </div>
                <div class="foot-t">
                    <a class="return-top" href="#top"><img src="/assets/img/foot-t.png"></a>
                </div>
                <div class="footer-c-rr left">
                    <div class="b-l-rr left"><p><a href="http://www.miibeian.gov.cn/">苏ICP备10019581号 </a></p></div>
                </div>
            </div>
        </div>
    </div>
    <script>
        $(function(){
            var sUserAgent = navigator.userAgent.toLowerCase();
            var bIsIpad = sUserAgent.match(/ipad/i) == 'ipad';
            var bIsIphone = sUserAgent.match(/iphone os/i) == 'iphone os';
            var bIsMidp = sUserAgent.match(/midp/i) == 'midp';
            var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == 'rv:1.2.3.4';
            var bIsUc = sUserAgent.match(/ucweb/i) == 'web';
            var bIsCE = sUserAgent.match(/windows ce/i) == 'windows ce';
            var bIsWM = sUserAgent.match(/windows mobile/i) == 'windows mobile';
            var bIsAndroid = sUserAgent.match(/android/i) == 'android';
            if(bIsIphone || bIsMidp || bIsUc7 || bIsUc || bIsCE || bIsWM || bIsAndroid ){
                 window.location.href = '<?=  Url::to(['index/m-index'])?>';
            }
            $('.sub').click(function(){
                var email = $('#email').val();
                $.ajax({  
                    type : "POST",  
                    url : "index/get-mail",  
                    data : 'email='+email,  
                    dataType : "json",  
                    success: function (data) {
                        $('#email').val('');
                        alert(data.msg);
                    }
                });
            });
        });
    </script>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
